package com.medicine.prm.service;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.medicine.common.exception.WarnException;
import com.medicine.prm.entity.Appointment;
import com.medicine.prm.entity.patient.Tbspatient;
import com.medicine.prm.mapper.AppointmentMapper;
import com.medicine.prm.param.AppointmentParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.text.ParseException;

@Service
public class AppointmentService extends ServiceImpl<AppointmentMapper, Appointment> {

    @Autowired
    private OutpatientService outpatientService;

    //预约挂号新增
    public void addAppointment(Appointment appointment){
        save(appointment);
    }


    public void installAppointment(AppointmentParam appointmentParam) throws WarnException, ParseException {

        Tbspatient p   = outpatientService.getTbspatient(appointmentParam);

//        save(appointment);
    }

}
